<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2017/12/22
 * Time: 15:00
 */

namespace App\Http\Traits;


use Illuminate\Http\Request;

trait CafeTrait
{
    use BaseTrait;

    // 咖啡馆ID
    protected $id;
    // 咖啡馆名称
    protected $name;
    // 咖啡馆地址
    protected $address;
    // 咖啡馆坐标
    protected $latlng;
    // 登录者的loginSession
    protected $loginSession;
    // 咖啡馆标签
    protected $cafeTags;
    // 咖啡馆LOGO
    protected $logo;
    //
    protected $slogan;
    //咖啡馆开始年份
    protected $since_year;
    // 附近车站
    protected $bus;
    // 平时开始营业时间（周一到周五）
    protected $open_time;
    // 平时打烊时间（周一到周五）
    protected $close_time;
    // 例外的营业时间（比如周六到周日可能会和其他日期营业时间不一样）
    protected $outside_time;
    // 分页大小
    protected $page_size;

    // 纬度
    protected $lat;
    // 经度
    protected $lng;
    // 标签列表字符串
    protected $tag_list_str;
    // 店休日
    protected $day_off;
    // 手机号
    protected $mobile;
    // 咖啡馆简单描述
    protected $summary;
    // 咖啡馆ID
    protected $cafe_id;

    // 分页大小
    protected $limit;
    // 显示状态
    protected $status;
    // 是否审核铜鼓
    protected $check_status;
    // 星级
    protected $star;
    // 标签ID
    protected $mark_id;
    // 照片列表字符串
    protected $photo_list_str;
    // wifi名称
    protected $wifi_ssid;
    // wifi密码
    protected $wifi_password;
    // wifi bssid
    protected $wifi_bssid;
    // 合作者key
    protected $key;
    // 日期
    protected $date;
    // 城市编码
    protected $citycode;
    // 标签列表字符串
    protected $mark_id_str;
    // 区域编码
    protected $adcode;
    // 咖啡馆封面
    protected $cover;
    // 给用户发送小程序系统通知需要
    protected $form_id;
    // 地址链接
    protected $url;
    // 视频ID
    protected $video_id;
    // 天数
    protected $day_num;
    // 用户ID
    protected $user_id;
    public function __construct(Request $request)
    {
        $this->id = $request->input('id', 0);
        $this->name = $request->input('name', '');
        $this->address = $request->input('address', '');
        $this->latlng = $request->input('latlng', '');
        $this->loginSession = $request->input('loginSession', '');
        $this->cafeTags = $request->input('tagsStr', '');
        $this->logo = $request->input('logo', '');
        $this->slogan = $request->input('slogan', '');
        $this->since_year = $request->input('since_year', '');
        $this->bus = $request->input('bus', '');
        $this->open_time = $request->input('open_time', '');
        $this->close_time = $request->input('close_time', '');
        $this->outside_time = $request->input('outside_time', '');
        $this->lat = $request->input('lat', '');
        $this->lng = $request->input('lng', '');
        $this->tag_list_str = $request->input('tag_list_str', '');
        $this->day_off = $request->input('day_off', '');
        $this->mobile = $request->input('mobile', '');
        $this->summary = $request->input('summary', '');
        $this->page_size = $request->input('page_size', '');
        $this->cafe_id = $request->input('cafe_id', 0);
        $this->limit = $request->input('limit', 0);
        $this->status = $request->input('status', '');
        $this->check_status = $request->input('check_status', '');
        $this->star = $request->input('star', 0);
        $this->mark_id = $request->input('mark_id', 0);
        $this->photo_list_str = $request->input('photo_list_str', '');
        $this->wifi_ssid = $request->input('wifi_ssid', '');
        $this->wifi_password = $request->input('wifi_password', '');
        $this->wifi_bssid = $request->input('wifi_bssid', '');
        $this->key = $request->input('key', '');
        $this->date = $request->input('date', '');
        $this->citycode = $request->input('citycode', 0);
        $this->mark_id_str = $request->input('mark_id_str', '');
        $this->adcode = $request->input('adcode', 0);
        $this->cover = $request->input('cover', 0);
        $this->form_id = $request->input('form_id' ,'');
        $this->url = $request->input('url', '');
        $this->video_id = $request->input('video_id', 0);
        $this->day_num = $request->input('day_num', 0);
        $this->user_id = $request->input('user_id', 0);
    }
}